﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FRL.DebtChased.Silverlight.Controls
{

	/// <summary>
	/// Declaration of TextRectangle class
	/// </summary>
	public partial class TextRectangle : UserControl
	{

		/////////////////////////////////////////////////////////////
		// Attributes

		public HorizontalAlignment HorizontalTextAlignment
		{
			get { return tb.HorizontalAlignment; }
			set { tb.HorizontalAlignment = value; }
		}

		public Color ForegroundColor
		{
			get { return (tb.Foreground as SolidColorBrush).Color; }
			set
			{
				tb.Foreground = new SolidColorBrush(value);
			}
		}

		public Brush ForegroundBrush
		{
			get { return tb.Foreground; }
			set
			{
				tb.Foreground = value;
			}
		}

		public Color BackgroundColor
		{
			get { return (rect.Fill as SolidColorBrush).Color; }
			set {
				rect.Fill = new SolidColorBrush(value);
			}
		}

		public string Text
		{
			get { return tb.Text; }
			set { tb.Text = value; }
		}

		/////////////////////////////////////////////////////////////
		// Construction

		public TextRectangle()
		{

			// Load xaml resources
			InitializeComponent();

		}

	}

}
